GDK W32: Add drag-to-snap feature to AeroSnap
authorРуслан Ижбулатов <lrn1986@gmail.com>
Tue, 8 Mar 2016 05:03:29 +0000 (05:03 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 30 Mar 2016 09:00:07 +0000 (09:00 +0000)
commitb420c53773ca5119afb43f0f351cb8f33c2bcaf9
treec88f8ddddeda7de700801ace06a141ffef110cd8
parent2ea96cf9461474d9ffbe8efc64c5946d48441cf4
GDK W32: Add drag-to-snap feature to AeroSnap

This implements the part of AeroSnap that snaps windows when you
drag them (while moving or resizing) to the edge of the screen.

It also fixes drag behaviour for snapped and maximized windows
(if such windows are dragged, first they must be unmaximized/unsnapped).

Note that this code does not take into account the shadow width, and
because of that the under-pointer-position-preserving window moves
might not look as such for maximized windows, which lack the shadow
when maximized, but do have the shadow when unmaximized.

This commit also doesn't cover some corner-cases the same way AeroSnap does.

Also, the snapping indicator (which is supposed to be a window shape that
shows where the window will be if the drag op is stopped at its current
point) is not being drawn, all routines responsible for its creation,
moving and drawing are stubs.

https://bugzilla.gnome.org/show_bug.cgi?id=763013
gdk/win32/gdkwindow-win32.c
gdk/win32/gdkwindow-win32.h